<template>
  <div>
    <LinSir ref="LinSir" />
    <el-table
      ref="multipleTable"
      :data="tableData"
      tooltip-effect="dark"
      style="width: 100%"
      @selection-change="handleSelectionChange"
    >
      <el-table-column
        type="selection"
        width="55"
      />
      <el-table-column
        prop="checkCode"
        label="盘点单号"
        width="120"
      />

      <el-table-column
        prop="ownerName"
        label="货主"
        width="120"
      />
      <el-table-column
        prop="status"
        label="盘点单状态"
        width="120"
      />

      <el-table-column
        prop="createTime"
        label="创建时间"
        width="120"
      />
      <el-table-column
        prop="planTaskTime"
        label="计划盘点时间"
        width="120"
      />
      <el-table-column
        fixed="right"
        label="操作"
        width="120"
      >
        <template slot-scope="scope">
          <el-button
            type="text"
            size="small"
            @click="$router.push(`list-detail/${scope.row.id}`)"
          >
            查看详情
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getList } from '@/api/contentIps'
export default {
  data() {
    return {
      tableData: [],
      multipleSelection: []
    }
  },

  async created() {
    this.tableData = (await getList()).records
  },

  methods: {

    handleSelectionChange(val) {
      this.multipleSelection = val
    }

  }
}
</script>
